Keep trashed songs in the Trash, and give We Recommend a shape - #545
Merged
Conversation
…mmend a shape A trashed song came back on the next launch whenever a second job shared its source URL. addTrackToLibrary evicted the trashed track to make room for the sibling's import, which dropped the catalog entry but not the job, so the directory and its registry record outlived their only reference. syncWithServer then found a job with no track, no trash entry and no tombstone, and re-adopted it. The trashed match is now left where the user put it: the new track is in no folder yet, so it reaches the library on its own, and evicting the old one was never what put it there. A Playwright spec seeds two jobs on one source URL and holds both halves, and seed.py grows a sibling job to make that possible. Three of the eight logos listed in the We Recommend dialog had no file behind them and 404'd for every user on every platform. They are bundled now, along with avatars for Beltr and Seratone, which had none at all. The dialog itself was one flat list of twelve entries with no order a reader could perceive. It is grouped into five categories, r/bass is added so the app matches the README, and the descriptions move out of hardcoded English into the i18n layer across all ten language tables. The README table gains the same categories so the two lists stop drifting apart. library.deleteFailed, English-only since #540, is filled in at the same time because the i18n audit cannot pass without it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three problems found while testing #541 on a Windows 0.16.1 build. All three were reproduced in the packaged app, and the first two were confirmed fixed there before this branch was opened.
Closes #542
Closes #543
Closes #544
Trashed songs came back (#542)
Trash a song, restart, and it was in the library again with the Trash empty.
addTrackToLibrarydeduplicates by source URL. When the match was in the Trash it deleted the catalog entry so the new import would land in the library, but it never deleted the job. The directory and its registry record outlived their only reference, and on the next launchsyncWithServerfound a job with no track, no trash entry and no tombstone, and re-adopted it.Any second job sharing the source URL was enough to reach it, and processing the same YouTube URL twice is how you get one.
The trashed match is now left alone. The new track is in no folder yet, so the placement that follows still lands it in the library. Evicting the old one was never what put it there.
Introduced in #402. Present in 0.16.0. It is not what #521 fixed: that covers hard delete and the server-side deletion record, this is the client-only soft-delete path and needs no failed write.
Verified in the packaged app. A trashed job stayed in the Trash across a restart, and again across a fresh import of the same URL, where the old code wiped it at import time.
Three logos 404'd for every user (#543)
FRIENDSlisted eight logo paths; five files existed. Analog4Lyfe, Empress Effects and Thomann showed a broken card on every install since they were listed, with a 404 in the backend log each time the dialog opened.All three are bundled now. Beltr and Seratone had no logo at all and get one too.
The Instagram avatars are 100x100, which is the largest the public profile page exposes and the same size as the five already in the tree.
We Recommend was a flat list of twelve (#544)
Twelve unrelated entries in one undifferentiated list, ordered by nothing a reader could perceive, with descriptions running to full sentences of uneven length.
Now grouped into five categories: Artists & Creators, Instrument Builders & Repair, Music Gear, Music & Karaoke Technology, Media & Community. Descriptions cut to a scannable line. The masonry and per-tile tilt are gone in favour of a plain grid.
r/bassis added, which was in the README and missing from the app. The README table gains the same categories, so the two lists stop drifting.The twelve descriptions were hardcoded English literals inside the array, so every non-English user read them in English. They are i18n keys now.
i18n
17 new keys across all ten full tables, with real translations.
ptPTgets 9 genuine European-Portuguese overrides and nothing else.library.deleteFailedhas been English-only since #540. The audit script cannot printcleanwhile it is missing, so it is filled in here. Happy to split it out if it should not ride along.Test
tests/e2e/trash-persistence.spec.mjs, two cases: the trashed track survives a restart, and a sibling import does not evict it.seed.pynow builds a second job sharing the fixture's source URL, andseedLibraryseeds both.Seeding the sibling is load-bearing. Without it, every existing spec's page load would send the sibling through the dedupe branch, renaming the fixture's id and breaking the selectors most specs click.
The test was checked in both directions: it fails against the old code and passes against the new.
Verification